Optimal. Leaf size=184 \[ \frac {b d \sin \left (a-b \sqrt {c}\right ) \text {Ci}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )}{2 \sqrt {c}}-\frac {b d \sin \left (a+b \sqrt {c}\right ) \text {Ci}\left (b \sqrt {c}-b \sqrt {c+d x}\right )}{2 \sqrt {c}}+\frac {b d \cos \left (a-b \sqrt {c}\right ) \text {Si}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )}{2 \sqrt {c}}+\frac {b d \cos \left (a+b \sqrt {c}\right ) \text {Si}\left (b \sqrt {c}-b \sqrt {c+d x}\right )}{2 \sqrt {c}}-\frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.35, antiderivative size = 184, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3432, 3342, 3333, 3303, 3299, 3302} \[ \frac {b d \sin \left (a-b \sqrt {c}\right ) \text {CosIntegral}\left (b \left (\sqrt {c+d x}+\sqrt {c}\right )\right )}{2 \sqrt {c}}-\frac {b d \sin \left (a+b \sqrt {c}\right ) \text {CosIntegral}\left (b \sqrt {c}-b \sqrt {c+d x}\right )}{2 \sqrt {c}}+\frac {b d \cos \left (a-b \sqrt {c}\right ) \text {Si}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )}{2 \sqrt {c}}+\frac {b d \cos \left (a+b \sqrt {c}\right ) \text {Si}\left (b \sqrt {c}-b \sqrt {c+d x}\right )}{2 \sqrt {c}}-\frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3299
Rule 3302
Rule 3303
Rule 3333
Rule 3342
Rule 3432
Rubi steps
\begin {align*} \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x^2} \, dx &=\frac {2 \operatorname {Subst}\left (\int \frac {x \cos (a+b x)}{\left (-\frac {c}{d}+\frac {x^2}{d}\right )^2} \, dx,x,\sqrt {c+d x}\right )}{d}\\ &=-\frac {\cos \left (a+b \sqrt {c+d x}\right )}{x}-b \operatorname {Subst}\left (\int \frac {\sin (a+b x)}{-\frac {c}{d}+\frac {x^2}{d}} \, dx,x,\sqrt {c+d x}\right )\\ &=-\frac {\cos \left (a+b \sqrt {c+d x}\right )}{x}-b \operatorname {Subst}\left (\int \left (-\frac {d \sin (a+b x)}{2 \sqrt {c} \left (\sqrt {c}-x\right )}-\frac {d \sin (a+b x)}{2 \sqrt {c} \left (\sqrt {c}+x\right )}\right ) \, dx,x,\sqrt {c+d x}\right )\\ &=-\frac {\cos \left (a+b \sqrt {c+d x}\right )}{x}+\frac {(b d) \operatorname {Subst}\left (\int \frac {\sin (a+b x)}{\sqrt {c}-x} \, dx,x,\sqrt {c+d x}\right )}{2 \sqrt {c}}+\frac {(b d) \operatorname {Subst}\left (\int \frac {\sin (a+b x)}{\sqrt {c}+x} \, dx,x,\sqrt {c+d x}\right )}{2 \sqrt {c}}\\ &=-\frac {\cos \left (a+b \sqrt {c+d x}\right )}{x}+\frac {\left (b d \cos \left (a-b \sqrt {c}\right )\right ) \operatorname {Subst}\left (\int \frac {\sin \left (b \sqrt {c}+b x\right )}{\sqrt {c}+x} \, dx,x,\sqrt {c+d x}\right )}{2 \sqrt {c}}-\frac {\left (b d \cos \left (a+b \sqrt {c}\right )\right ) \operatorname {Subst}\left (\int \frac {\sin \left (b \sqrt {c}-b x\right )}{\sqrt {c}-x} \, dx,x,\sqrt {c+d x}\right )}{2 \sqrt {c}}+\frac {\left (b d \sin \left (a-b \sqrt {c}\right )\right ) \operatorname {Subst}\left (\int \frac {\cos \left (b \sqrt {c}+b x\right )}{\sqrt {c}+x} \, dx,x,\sqrt {c+d x}\right )}{2 \sqrt {c}}+\frac {\left (b d \sin \left (a+b \sqrt {c}\right )\right ) \operatorname {Subst}\left (\int \frac {\cos \left (b \sqrt {c}-b x\right )}{\sqrt {c}-x} \, dx,x,\sqrt {c+d x}\right )}{2 \sqrt {c}}\\ &=-\frac {\cos \left (a+b \sqrt {c+d x}\right )}{x}+\frac {b d \text {Ci}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right ) \sin \left (a-b \sqrt {c}\right )}{2 \sqrt {c}}-\frac {b d \text {Ci}\left (b \sqrt {c}-b \sqrt {c+d x}\right ) \sin \left (a+b \sqrt {c}\right )}{2 \sqrt {c}}+\frac {b d \cos \left (a-b \sqrt {c}\right ) \text {Si}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )}{2 \sqrt {c}}+\frac {b d \cos \left (a+b \sqrt {c}\right ) \text {Si}\left (b \sqrt {c}-b \sqrt {c+d x}\right )}{2 \sqrt {c}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 1.20, size = 240, normalized size = 1.30 \[ \frac {i \left (e^{-i a} \left (-b d x e^{-i b \sqrt {c}} \text {Ei}\left (-i b \left (\sqrt {c+d x}-\sqrt {c}\right )\right )+b d x e^{i b \sqrt {c}} \text {Ei}\left (-i b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+2 i \sqrt {c} e^{-i b \sqrt {c+d x}}\right )+e^{i \left (a-b \sqrt {c}\right )} \left (b d x e^{2 i b \sqrt {c}} \text {Ei}\left (i b \left (\sqrt {c+d x}-\sqrt {c}\right )\right )-b d x \text {Ei}\left (i b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+2 i \sqrt {c} e^{i b \left (\sqrt {c+d x}+\sqrt {c}\right )}\right )\right )}{4 \sqrt {c} x} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [C] time = 0.98, size = 210, normalized size = 1.14 \[ \frac {\sqrt {-b^{2} c} d x {\rm Ei}\left (i \, \sqrt {d x + c} b - \sqrt {-b^{2} c}\right ) e^{\left (i \, a + \sqrt {-b^{2} c}\right )} - \sqrt {-b^{2} c} d x {\rm Ei}\left (i \, \sqrt {d x + c} b + \sqrt {-b^{2} c}\right ) e^{\left (i \, a - \sqrt {-b^{2} c}\right )} + \sqrt {-b^{2} c} d x {\rm Ei}\left (-i \, \sqrt {d x + c} b - \sqrt {-b^{2} c}\right ) e^{\left (-i \, a + \sqrt {-b^{2} c}\right )} - \sqrt {-b^{2} c} d x {\rm Ei}\left (-i \, \sqrt {d x + c} b + \sqrt {-b^{2} c}\right ) e^{\left (-i \, a - \sqrt {-b^{2} c}\right )} - 4 \, c \cos \left (\sqrt {d x + c} b + a\right )}{4 \, c x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos \left (\sqrt {d x + c} b + a\right )}{x^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.08, size = 714, normalized size = 3.88 \[ \frac {2 d \left (\frac {\cos \left (a +b \sqrt {d x +c}\right ) \left (-\frac {b^{2} a \left (a +b \sqrt {d x +c}\right )}{2 c}+\frac {b^{2} \left (-c \,b^{2}+a^{2}\right )}{2 c}\right )}{-c \,b^{2}+\left (a +b \sqrt {d x +c}\right )^{2}-2 a \left (a +b \sqrt {d x +c}\right )+a^{2}}-\frac {b a \left (\Si \left (b \sqrt {c}-b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}-b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )\right )}{4 c^{\frac {3}{2}}}+\frac {b a \left (-\Si \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )\right )}{4 c^{\frac {3}{2}}}-\frac {b \left (c \,b^{2}+a \left (a +b \sqrt {c}\right )-a^{2}\right ) \left (-\Si \left (b \sqrt {c}-b \sqrt {d x +c}\right ) \cos \left (a +b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}-b \sqrt {c}\right ) \sin \left (a +b \sqrt {c}\right )\right )}{4 c^{\frac {3}{2}}}+\frac {b \left (c \,b^{2}+a \left (a -b \sqrt {c}\right )-a^{2}\right ) \left (\Si \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )\right )}{4 c^{\frac {3}{2}}}-a \,b^{4} \left (\frac {\cos \left (a +b \sqrt {d x +c}\right ) \left (-\frac {a +b \sqrt {d x +c}}{2 c \,b^{2}}+\frac {a}{2 c \,b^{2}}\right )}{-c \,b^{2}+\left (a +b \sqrt {d x +c}\right )^{2}-2 a \left (a +b \sqrt {d x +c}\right )+a^{2}}-\frac {\Si \left (b \sqrt {c}-b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}-b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )}{4 c^{\frac {3}{2}} b^{3}}+\frac {-\Si \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )}{4 c^{\frac {3}{2}} b^{3}}-\frac {-\Si \left (b \sqrt {c}-b \sqrt {d x +c}\right ) \cos \left (a +b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}-b \sqrt {c}\right ) \sin \left (a +b \sqrt {c}\right )}{4 c \,b^{2}}-\frac {\Si \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )+\Ci \left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )}{4 c \,b^{2}}\right )\right )}{b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos \left (\sqrt {d x + c} b + a\right )}{x^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\cos \left (a+b\,\sqrt {c+d\,x}\right )}{x^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos {\left (a + b \sqrt {c + d x} \right )}}{x^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________